package com.ruoyi.odorservice.model.bean;

import lombok.Data;

import java.util.Arrays;

@Data
public class DoubleArray {
    private double[] array;

    public DoubleArray(double[] array) {
        this.array = array.clone(); // 克隆数组以确保独立性
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DoubleArray that = (DoubleArray) o;
        return Arrays.equals(this.array, that.array);
    }

    @Override
    public int hashCode() {
        return Arrays.hashCode(array);
    }

}
